<?php 
session_start();
include_once 'data/usercheck.php'; ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>Food Online</title>
	<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
    <style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
    </style>
</head>
<body>
<div id="wrapper">
<div id="logo">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="200" border="0" align="center">
    <tr>
      <td height="30"><FONT size="+6">
        <div align="center">STMS</div></td>
    </tr>
    <tr>
      <td><div align="center">STUDENT MANAGEMENT SYSTEM</div></td>
    </tr>
</table>
  <p>&nbsp;</p>
</div>
    <div id="nav">
      <div id="nav-left">
        <ul>
          <li><a href="HometoAdmin.php">Home</a></li>
          <li class="orange">
            <div align="left"><a href="http://localhost/stms/pages/data/logout.php">Logout-<?php include_once 'data/databaseconnection.php';session_start();echo $_SESSION['username'];?></a></div>
          </li>
        </ul>
      </div>
      <div id="nav-right">
        <ul>
         
           <li><a href="Aboutus.php">About us</a></li>
          <li><a href="viewhome.php">Student</a></li>
          <li><a href="Adminhome.php">Admin</a></li>
          <li><a href="http://studentmanagements.blogspot.com/">Contact</a></li>
        </ul>
      </div>
    </div>
    
    <div id="body">
    <div align="right"></div>
    <div class="clear">
      <div align="right">
        <div align="left">
          <div align="left">
            <table width="751" border="0">
              <tr>
                <td width="96" height="23"><font size="+1"><a href="showadmin.php">Basicdetails</a></font></td>
                <td width="79"><font size="+1"><a href="aladmin.php">A/Ldetails</a></font></td>
                <td width="100"><font size="+1"><a href="compinadmin.php">Combination</a></font></td>
                <td width="59"><font size="+1"><a href="courseadmin.php">Course</a></font></td>
                <td width="51"><font size="+1"><a href="Resultadmin.php">Result</a></font></td>
                <td width="94"><font size="+1"><a href="changepass.php"><font size="+1"></font></a><font size="+1"><a href="attendadmin.php">Attendance</a></font></font></td>
                <td width="242"><div align="right"><font size="+1"><a href="changepass.php">changepassword</a></font></div></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      <p>&nbsp;</p>
      <p>
        <?php
        if (isset($_GET['err'])) {
            $err = $_GET['err'];
            echo '<span  style="color:  #F4C389"  >'.$err.'</span>';
        }
        ?>
      </p>
        <form id="form1" method="post" action="attendinsert.php">
          <p>
            <label for="textfield"></label>
			
			
			<script type="text/javascript">
<!--
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(day + "/" + month + "/" + year)
//-->
</script>
          </p>
      </form>
        <p>&nbsp;</p>
        <?php
// contact to database
$connect = mysql_connect("localhost", "root", "") or die ("Error , check your server connection.");
mysql_select_db("stms");

$attend=mysql_query("SELECT * FROM attendence");
//echo mysql_num_rows($attend);

if (!$attend) {
        die('Invalid query: ' . mysql_error());
		//echo "dgbzjnmhdfk";
    }

if (mysql_num_rows($attend))
			{
				echo '<table border="1">';
				echo "<tr>";
				echo "<th>DATE</th>";
				echo "<th>TIME</th>";
				echo "<td>SUBJECTCODE</th>";
				echo "<th>NOOFPRESENT</th>";

				while($row=mysql_fetch_array($attend))
			{
				echo "<tr><td>".$row['Date'];
				echo "<td>".$row['Time'];
				echo "<td>".$row['SubjectCode'];
				echo "<td>".$row['Noofpresent'];


			}
			echo "</table>";
}
?>
        <form id="form2" method="post" action="">
          <p>
             <label for="imageField"></label>
        </p>
        </form>
        <p>&nbsp;</p>
      </div>
      <div id="footer">
        <ul>
          <li><a href="HometoAdmin.php">Home</a> | </li>
          <li><a href="Aboutus.php">About Us</a> | </li>
          <li></li>
          <li><a href="http://studentmanagements.blogspot.com/">Contact</a></li>
        </ul>
        <p>copyright &copy;STMS Group03</p>
      </div>
  </div>
</div>
</body>
</html>
